# Maintainer: Thomas Dziedzic < gostrc at gmail >
# Contributor: Dan Serban
# Contributor: Richard Murri

pkgname=python2-werkzeug
pkgver=0.8.3
pkgrel=1
pkgdesc='The Swiss Army knife of Python web development'
arch=('any')
url='http://werkzeug.pocoo.org/'
license=('custom:BSD')
depends=('python2')
makedepends=('python2-distribute')
source=("http://pypi.python.org/packages/source/W/Werkzeug/Werkzeug-${pkgver}.tar.gz")
md5sums=('12aa03e302ce49da98703938f257347a')

build() {
  cd Werkzeug-${pkgver}

  sed \
    -e 's_#!/usr/bin/env python_&2_' \
    -i werkzeug/testsuite/multipart/collect.py

  python2 setup.py build
}

check() {
  cd Werkzeug-${pkgver}

  python2 setup.py test
}

package() {
  cd Werkzeug-${pkgver}

  python2 setup.py install --root=${pkgdir} --optimize=1

  install -d ${pkgdir}/usr/share/licenses/python2-werkzeug
  install -m644 LICENSE \
    ${pkgdir}/usr/share/licenses/python2-werkzeug
}
